package com.example.utils;

import com.alibaba.druid.pool.DruidDataSource;

/**
 * 该类定义数据库链接
 * 该数据库 为我的网络数据库可以直接使用
 *
 * @author kangshuai
 */
public class DruidUtils {

    private static DruidDataSource druidDataSource = new DruidDataSource();


    static {
        druidDataSource.setDriverClassName("com.mysql.jdbc.Driver");
        druidDataSource.setUrl("jdbc:mysql://8.140.109.153:3306/lagou");
        druidDataSource.setUsername("root");
        druidDataSource.setPassword("Zktb@958");

    }

    public static DruidDataSource getInstance() {
        return druidDataSource;
    }
}
